<?php

declare(strict_types=1);

namespace app\api\controller;

use app\common\service\UploadService;
use think\Request;

class Upload extends Controller
{
    /**
     * 上传图片
     */
    public function upload(Request $request)
    {
        $file = UploadService::upload($request->post('file_type', 'image'),$request->post('group_id', 0),'uploads',false);
        return success('上传成功', $file);
    }
}
